package com.itheima.d7_thread_communication;

/*
    目标：了解一下线程通信。
    需求：1个生产者线程，负责生产包子，每个线程每次只能生产1个包子放在桌子上
    1个消费者线程负责吃包子，每人每次只能从桌子上拿1个包子吃。
*/
public class ThreadTest {
    public static void main(String[] args) {
        Cook cook = new Cook();
        Foodie foodie = new Foodie();

        Thread cookThread = new Thread(String.valueOf(cook));
        Thread foodieThread = new Thread(String.valueOf(foodie));

        cookThread.start();
        foodieThread.start();
    }
}
